/*
 * SensorInterrupt.h
 *
 * Deals with sensor interrupts
 *
 * Author: Zachary Masiello
 * Author: Peter-John Rowe
 */

#ifndef SENSORINTERRUPT_H_
#define SENSORINTERRUPT_H_

#include "IOPort.h"
#include <iostream.h>
#include <hw/inout.h>
#include <sys/neutrino.h>
#include <stdint.h>
#include <sys/mman.h>
#include <stdio.h>
#include <sys/time.h>
#include <vector>
using namespace std;

const struct sigevent * interruptReceived(void *arg, int id);

class SensorInterrupt
{
public:
	SensorInterrupt();
	int getCount();
	int getAllCount();
	static void* config(void *);
	virtual ~SensorInterrupt();
	double getTime();
	void calcDistance(bool);
	void resetDistance();
};

#endif /* SENSORINTERRUPT_H_ */
